#ifndef FILEPRINTDETAIL_H
#define FILEPRINTDETAIL_H
#include <streambuf>
#include "outformat.h"
#include "stdffield.h"
#include <vector>

using std::ofstream;

namespace opsrc {

    class FilePrintDetail : public OutFormat
    {
    public:
        FilePrintDetail();
        void out(RecBase* rec);
        void out(string& ){
        }
        void out(const char*){
        }
        void out(int){
        }
        void out(float){
        }
        void out(long){
        }
        void open(){
        }
        void close(){
        }
        void setLotID(const string val);
        void setWaferID(const string val);
        bool saveToFile(std::vector<RecBase*> vec, std::string filename);
        void savePtrRecord(std::vector<RecBase*> vec);

    private:
        void writeRecAttributes(RecBase* rec);
        string convertBoolArraytoStr( StdfField<vector<bool> > flag);
        string convertIntArraytoStr(StdfField<vector<int> > uintVals);
        string convertUIntArraytoStr(StdfField<vector<unsigned int> > uintVals);
        string convertStrArraytoStr(StdfField<vector<string> > uintVals);

        std::ofstream* pfile;
        string lot_id;
        string wafer_id;
    };
}
#endif // FILEPRINTDETAIL_H
